﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace APP.HELPER.Utils.System
{
    public class VNConvert
    {
        private string[,] _Vn = new string[14, 18];
        public string Remove(string Text)
        {
            string text = Text;
            for (int i = 0; i <= 13; i++)
            {
                for (int j = 1; j <= 17; j++)
                {
                    string text2 = text.Replace(this._Vn[i, j], this._Vn[i, 0]);
                    text = text2;
                }
            }
            return text;
        }
        public VNConvert()
        {
            string text = "aAeEoOuUiIdDyY";
            string text2 = "áàạảãâấầậẩẫăắằặẳẵ";
            string text3 = "ÁÀẠẢÃÂẤẦẬẨẪĂẮẰẶẲẴ";
            string text4 = "éèẹẻẽêếềệểễeeeeee";
            string text5 = "ÉÈẸẺẼÊẾỀỆỂỄEEEEEE";
            string text6 = "óòọỏõôốồộổỗơớờợởỡ";
            string text7 = "ÓÒỌỎÕÔỐỒỘỔỖƠỚỜỢỞỠ";
            string text8 = "úùụủũưứừựửữuuuuuu";
            string text9 = "ÚÙỤỦŨƯỨỪỰỬỮUUUUUU";
            string text10 = "íìịỉĩiiiiiiiiiiii";
            string text11 = "ÍÌỊỈĨIIIIIIIIIIII";
            string text12 = "đdddddddddddddddd";
            string text13 = "ĐDDDDDDDDDDDDDDDD";
            string text14 = "ýỳỵỷỹyyyyyyyyyyyy";
            string text15 = "ÝỲỴỶỸYYYYYYYYYYYY";
            for (int i = 0; i <= 13; i++)
            {
                this._Vn[i, 0] = text.Substring(i, 1);
            }
            for (int j = 1; j <= 17; j++)
            {
                for (int i = 1; i <= 17; i++)
                {
                    this._Vn[0, i] = text2.Substring(i - 1, 1);
                    this._Vn[1, i] = text3.Substring(i - 1, 1);
                    this._Vn[2, i] = text4.Substring(i - 1, 1);
                    this._Vn[3, i] = text5.Substring(i - 1, 1);
                    this._Vn[4, i] = text6.Substring(i - 1, 1);
                    this._Vn[5, i] = text7.Substring(i - 1, 1);
                    this._Vn[6, i] = text8.Substring(i - 1, 1);
                    this._Vn[7, i] = text9.Substring(i - 1, 1);
                    this._Vn[8, i] = text10.Substring(i - 1, 1);
                    this._Vn[9, i] = text11.Substring(i - 1, 1);
                    this._Vn[10, i] = text12.Substring(i - 1, 1);
                    this._Vn[11, i] = text13.Substring(i - 1, 1);
                    this._Vn[12, i] = text14.Substring(i - 1, 1);
                    this._Vn[13, i] = text15.Substring(i - 1, 1);
                }
            }
        }
    }
}
